
#include "ping.h"
#include <time.h>
#include <sys/time.h>

void tv_sub(struct timeval * out, struct timeval * in) {

    if ((out->tv_usec -= in->tv_usec) < 0) {

        out->tv_usec = out->tv_usec + 1000000;
        out->tv_sec  = out->tv_sec - 1;
    }
    out->tv_sec = out->tv_sec - in->tv_sec;
}


